package com.wanmait.recycle.service;

import java.util.List;

import javax.servlet.http.HttpSession;

import com.github.pagehelper.PageInfo;
import com.wanmait.recycle.pojo.Admin;
import com.wanmait.recycle.pojo.Rubbish;
import com.wanmait.recycle.pojo.Secondtype;
import com.wanmait.recycle.pojo.Unit;
import com.wanmait.recycle.pojo.Userinfo;
import com.wanmait.recycle.util.Pager;

public interface RubbishService extends CommonService<Rubbish> {
	PageInfo<Rubbish> findAllByPager();
	
	List<Rubbish> findAll();
	
	List<Unit> findAllUnits();
	
	void addRubbish(String name,Integer type1Id,Integer type2id,String pic,String content,Admin admin,String unitString);
	
	void insert(Rubbish object);
	
	void update(Rubbish object);
	
	void deleteById(Integer id);
	
	void deleteByIds(String ids);
	
	void insertById(Integer id);
	
	void recallById(Integer id);
	
	PageInfo<Rubbish> findAllBySearch(String searchStr,String beginTime,String endTime);

	Rubbish selectById(Integer id);
	void updateById(Integer id,String name,Integer type1Id,Integer type2id,String pic,String content,Admin admin,String unitString);

	List<Rubbish> findByUserId(Integer id);

	void userAddRubbish(String objectName, Integer firsttypeId, Integer secondtypeId, String pic, String content,
			Userinfo userinfo, String unitString);

	Integer findMaxId();

	void realDelete(Integer objectId);
		
	//<!-- 根据一级分类查找二级分类列表 3.6 ad -->
	List<Rubbish> findAllBySecondTypeId(Integer secondTypeId);
	//根据查询来获得所有的垃圾
	List<Rubbish> findAllBySearch(String seachData);
	//根据solr来查找相关信息
	List<Rubbish> seachBySolr(String keyword, Pager pager);

	Rubbish findByRubbishNameAndContent(String objectName, String content);

	PageInfo<Rubbish> findAllUnCheckByPager();
	
	PageInfo<Rubbish> findAllPassByPager();

	PageInfo<Rubbish> findAllUnPassByPager();

	Boolean judgeIfRepetition(String objectName, Integer nSecondTypeId);

	PageInfo<Rubbish> findAllByPrimarykey(Integer nScId);
	
}
